// 存储分类页面展示的商品
import 'package:flutter/material.dart';
import 'package:flutter_myshop/model/category_goods.dart';

class CategoryGoodListProvider with ChangeNotifier {
  List<Good> categoryGoodList = [];

  int page = 0;

  void setGoodsList(List<Good> list) {
    categoryGoodList = list;
    notifyListeners();
  }

  void addGoodsList(List<Good> list) {
    categoryGoodList.addAll(list);
    notifyListeners();
  }

  void setPage(int page) {
    this.page = page;
    notifyListeners();
  }

  void IncreasePage() {
    this.page++;
    notifyListeners();
  }
}
